<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<head>
    <link type="text/css" rel="stylesheet" href="lib/gridmanager/index.css">
    <link type="text/css" rel="stylesheet" href="lib/jedate/jedate.css">
    <script src="lib/jquery/jquery-3.6.3.min.js"></script>
    <script src="lib/gridmanager/index.js"></script>
    <script src="lib/jedate/jedate.js"></script>
    <script src="js/log.js?v=202007022"></script>

    <style type="text/css">
        .box {
            width: auto;
            float: left;
            background-color: #ffffff;
            padding: 10px;
            height: 40px;
            margin: auto;
        }

        .select {
            width: 180px;
        }

        .content {
            height: 100%;
            width: 100%;
            margin: 0;
            display: flex;
            flex-direction: column;
        }

        .searchBar {
            width: 100%;
            display: flex;
            max-height: 300px;
        }

        .search {
            overflow: auto;
            flex: 1;
        }

        .searchButtonContent {
            width: 90px;
            padding: 5px;
            display: flex;
            flex-direction: column;
        }

        .searchButtonContent Button{
            margin-bottom: 15px;
        }

        .searchButtonContent button:last-child {
            margin-bottom: 0;
        }

        .searchButton {
            height: 35px;
            width: 100%;
        }

        .truncate-text {
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.5;
            max-height: 120px;
            word-break: break-all;
        }

        .dialog {
            display: flex;
            align-items: center;
            justify-content: center;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            z-index: 9999;
        }

        .dialog-inner {
            background-color: #fff;
            border-radius: 1%;
            padding: 1%;
        }
    </style>
</head>

<body>
<div class="content">

    <div id="searchBar" class="searchBar">
        <div class="search">
            <div class="box">
                <li>请求方法：<input class="select" type="text" id="method"/>
                </li>
            </div>
            <div class="box">
                <li>客户地址：<input class="select" type="text" id="ip"/>
                </li>
            </div>
            <div class="box">
                <li>请求参数：<input class="select" type="text" id="param"/>
                </li>
            </div>
            <div class="box">
                <li>请求头部：<input class="select" type="text" id="header"/>
                </li>
            </div>
            <div class="box">
                <li>请求结果：<input class="select" type="text" id="result"/>
                </li>
            </div>
            <div class="box">
                <li>线程名称：<input class="select" type="text" id="thread"/>
                </li>
            </div>
            <div class="box">
                <li>开始时间：<input class="select" type="text" id="startTime" placeholder="hh:mm:ss" readonly>
                </li>
            </div>
            <div class="box">
                <li>结束时间：<input class="select" type="text" id="endTime" placeholder="hh:mm:ss" readonly>
                </li>
            </div>
            <div class="box">
                <li>时间范围： <select id="domain" class="select">
                    <option value="0">-------------</option>
                    <option value="5">五分钟内</option>
                    <option value="30">半小时内</option>
                    <option value="60">一小时内</option>
                    <option value="360">六小时内</option>
                    <option value="720">十二小时内</option>
                </select>
                </li>
            </div>
            <div class="box">
                <li>日志分类：
                    <select id="logType" class="select">
                        <option value="">-------------</option>
                    </select>
                </li>
            </div>
            <div class="box">
                <li>时间顺序：<input type="radio" name="sort" checked="checked">倒序
                    <input type="radio" name="sort">正序
                </li>
            </div>

        </div>
        <div class="searchButtonContent">
            <button class="searchButton" id="btn_status" onclick="showStatus()">状态</button>
            <button class="searchButton" id="btn_search" onclick="searchTable()">搜索</button>
            <button class="searchButton" id="btn_clean" onclick="clearSearch()">重置</button>
        </div>
    </div>
    <table style="flex-grow: 1;overflow: auto;">
    </table>
</div>

<div id="dialog" class="dialog">
    <div class="dialog-inner" style="width: 40%;height: 60%;display: flex;
            flex-direction: column;align-items: center;justify-content: center;">
        <div id="dialog_content"
             style="width: 100%; height: 25%; flex-grow: 1;word-break: break-all;overflow: auto;">
        </div>
        <button style="padding-left: 10px;padding-right: 10px;font-size: 20px;" id="dialog_close"
                onclick="closeDialog()">关闭
        </button>
    </div>
</div>
</body>

</html>